Method and system for image scaling detection

ABSTRACT

A method and system for image scaling detection is provided. Image scaling detection involves receiving a decoded scaled input image having a plurality of pixels, wherein the input image has a scaling ratio relative to an original image; detecting blocking boundary artifact pixels in the image; determining a sum of pixel values for each blocking boundary artifact; detecting the pixel distance value between each pair or neighboring block boundaries; and determining the scaling ratio based on a distance value and said sum of pixel values.

FIELD OF THE INVENTION

The present invention relates generally to image processing, and in particular to image scaling.

BACKGROUND OF THE INVENTION

With the proliferation of video communications, it is becoming increasingly important to improve the quality of images displayed on large display screens at a high resolution. Typically, image/video post-processing functions are implemented to improve and enhance the image/video signals displayed.

Digital video image content is typically encoded by a variety of digital compression techniques such as JPEG and MPEG to meet data bandwidth limitations in communication networks. Compressed digital images contain varying degrees of artifacts that deteriorate the quality of displayed video images and scenes. Such artifacts are referred to herein as “compression noise or blocking artifacts”. As such, compression noise reduction is applied in post-processing to reduce noise. Compression noise reduction detects and removes JPEG/MPEG blocking artifacts from the digital videos before displaying on a screen.

In compression noise reduction, a process for removing blocking artifacts is performed by filtering along block boundaries which are caused by data compression, such as MPEG. However, as the size and resolution of the display screens are increasing, such display screens are larger than the original size of image/video signals transferred through a network. As such, the signals transferred are enlarged using a scaling ratio to fit the size of the larger displays. If the scaling ratio is known, a typical blocking artifact reducer may adjust the location of image filtering according to the scaling ratio. However, if the scaling ratio is not known (such as for an outsource input to a television), then such a blocking artifact reducer fails to remove the artifacts effectively.

BRIEF SUMMARY OF THE INVENTION

The present invention provides a method and system for image scaling detection. One embodiment involves receiving a decoded scaled input image comprising a plurality of pixels, wherein the input image has a scaling ratio relative to an original image; detecting blocking boundary artifact pixels in the image; determining a sum of pixel values for each blocking boundary artifact; detecting the pixel distance value between each pair or neighboring block boundaries; and determining said scaling ratio based on a distance value and said sum of pixel values.

Determining the scaling ratio may further include determining pixel position difference values for each pair of neighboring sum of pixel values, determining a peak value among the pixel position difference values, and determining said scaling ratio based on said peak value and said pixel position difference value. The scaling ratio may be determined as a ratio of the said peak value to said pixel position difference value.

These and other features, aspects and advantages of the present invention will become understood with reference to the following description, appended claims and accompanying figures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a functional block diagram of an image post-processing system 10 implementing image scaling detection for image enhancement, according to an embodiment of the present invention.

FIGS. 2A-B show horizontal and vertical blocking artifact boundaries, respectively.

FIGS. 2C-D show vertical block boundaries in an original image and a scaled version of the original image, respectively.

FIG. 3 shows a functional block diagram of an embodiment of the image scale ratio detector, according to the present invention.

FIG. 4 shows an example of an image scaling ratio detection process, according to the present invention.

DETAILED DESCRIPTION OF THE INVENTION

The present invention provides a method and system for detecting the scaling ratio of scaled (enlarged/reduced) image/video signals for image processing such as enhancement, restoration, compression noise reduction, etc. One embodiment involves detecting a scale ratio of an enlarged digital image relative to an original digital image. The scaling ratio can guide the application of image processing techniques to proper locations in an enlarged (scaled) image.

An implementation of the present invention involves detecting an image scale ratio and applying appropriate image processing to the scaled image based on the detected image ratio. The present invention is also applicable to cases where an image size is reduced (scaled down by a ratio) compared to an original image. Utilizing the scaling ratio may improve the performance of blocking artifact reducers for enhancing the compressed image/video data that is then decompressed and enlarged for display, wherein blocking artifact reduction is applied to the decompressed and enlarged image.

FIG. 1 shows a functional block diagram of an image post-processing system 10 implementing image scaling detection for image enhancement, according to an embodiment of the present invention. The system 10 receives a decompressed (decoded) input image in an input processor 100, and enhances the image in the image enhancer 102 to generate an enhanced output image passed to an output image processor 106. Enhancement in the image enhancer 102 comprises blocking artifact reduction using a scaling ratio determined by an image scale ratio detector 104, according to an embodiment of the present invention.

FIGS. 2A-B show horizontal and vertical blocking artifact boundaries, respectively, in an uncompressed enlarged digital image. Specifically, in FIG. 2A a pixel p with the value A₀, is a vertical block boundary pixel located at the left side of the vertical block boundary. The values A₁, A₂, A₃, A−₁, A−₂ and A⁻³, are for some of the neighboring pixels of the center pixel. In FIG. 2B, a pixel p with value B₀ is a horizontal block boundary pixel, located at the top side of the horizontal block boundary. Values B₁, B₂, B₃, B−₁, B−₂ and B⁻³, are for some of the neighboring pixels of the center pixel. FIG. 2C shows two vertical block boundaries in an original image, and FIG. 2D shows vertical block boundaries of an enlarged version of the original image. The enhancer 102 applies blocking artifact removal at the block boundaries.

FIG. 3 shows a functional block diagram of an embodiment of the image scale ratio detector 104. The ratio detector 104 includes a binary edge mapping module 200, a summing module 202, a projection histogram module 204, a peak-to-peak histogram module 206 and a scale ratio calculation module 208. The ratio detector 104 detects the image scaling ratio, according to an example process 300 shown in FIG. 4, described below.

Referring back to FIG. 2C, a decoded (decompressed) original image 304 includes vertical blocking boundaries (artifacts) 306 spaced by a number n of pixels p (e.g., spacing of n=8 pixels is shown in FIG. 2C). A decoded (decompressed) input image 302 (FIG. 2D) is a scaled version of the original image 304 by a ratio r (e.g., image 302 is r−1.25 times larger in area than image 304). The image 302 includes vertical blocking boundaries (artifacts) 306e corresponding to the boundaries 306 in the original image 304 (FIG. 2C). The image 302 is shown in decompressed form.

Now referring to FIG. 4, in conjunction with FIG. 2D, in this example a horizontal scale ratio (along the x-axis) is determined by detecting the vertical block boundaries 306 e in the input image 302. Then, a binary map 401 of blocking boundaries (artifacts) 306 e for the decompressed image 302 is obtained (step 301). In one implementation, a strong edge detector function of the module 200 processes an input image signal Y_(IN), wherein the input signal Y_(IN) is low-pass filtered with using a n×m window at each image pixel location (x, y) to generate a filtered signal Y_(L) as:

${Y_{L}\left( {x,y} \right)} = {\frac{1}{n \times m} \cdot {\sum\limits_{i = 0}^{n - 1}{\sum\limits_{j = 0}^{m - 1}{{Y_{IN}\left( {{x + i},{y + j}} \right)}.}}}}$

Next, commonly used four directional Sobel operators are performed on the low-pass filtered image Y_(L)(x,y) to find image edges Y_(H) as:

${{Y_{H}\left( {x,y} \right)} = {\frac{1}{4}{\sum\limits_{k = 1}^{4}{\sum\limits_{i = {- 1}}^{1}{\sum\limits_{j = {- 1}}^{1}{{abs}\left( {{M_{k}\left( {i,j} \right)} \cdot {Y_{L}\left( {{x + i},{y + j}} \right)}} \right)}}}}}},$

wherein, abs(·) indicates an absolute value of (·), M_(k)(i,j) is the k^(th) Sobel operator according to the relation set below, wherein each Sobel filter is used to obtain edge information:

${{M_{1}\left( {i,j} \right)} = \begin{bmatrix} 1 & 0 & {- 1} \\ 1 & 0 & {- 1} \\ 1 & 0 & {- 1} \end{bmatrix}},\mspace{14mu} {{M_{2}\left( {i,j} \right)} = \begin{bmatrix} 1 & 1 & 1 \\ 0 & 0 & 0 \\ {- 1} & {- 1} & {- 1} \end{bmatrix}},{{M_{3}\left( {i,j} \right)} = \begin{bmatrix} 1 & 1 & 0 \\ 1 & 0 & {- 1} \\ 0 & {- 1} & {- 1} \end{bmatrix}},{{{and}\mspace{14mu} {M_{4}\left( {i,j} \right)}} = {\begin{bmatrix} 0 & {- 1} & {- 1} \\ 1 & 0 & {- 1} \\ 1 & 1 & 0 \end{bmatrix}.}}$

An example of obtaining a binary map then involves obtaining a binary map Y_(B) for edges/boundaries using a threshold value τ as:

${Y_{B}\left( {x,y} \right)} = \left\{ {\begin{matrix} 1 & {{{if}\mspace{14mu} {Y_{H}\left( {x,y} \right)}} > \tau} \\ 0 & {otherwise} \end{matrix},} \right.$

wherein Y_(H) represents a boundary as noted above.

Next, a total sum 402 of occurrences in each image column c containing a boundary 306 is obtained (step 303). The occurrence in each column containing the block edges (where, the binary map indicates the block edges) is summed, on the enlarged image.

Further, the sum 402 of occurrences in each of said columns c is then projected on a histogram 403 after threshold (step 305). The bins of the histogram, larger than a certain amount, are selected. Histogram 403 shows the result of the previous counts of occurrence in each column. The vertical axis of the histogram is the number of pixels belonging to the edge.

Thereafter, from left to right of the histogram 403, the column distance between the peaks in the projection histogram 403 is obtained (i.e., peak-to-peak column distance Δ₁, Δ₂, . . . ). Once the bins of the histogram greater than a certain amount (threshold) are selected, the distance from a bin to its nearest neighboring bin is peak-to-peak distance.

The peak-to-peak column distance is then projected on a histogram 405 of peak-to-peak column distance Δ (step 307). The vertical axis of histogram 405 is the number of counts that the peak-to-peak value falls on each bin.

Finally, from the histogram 405, the scale ratio r can be determined according to relation (1) below, as:

$\begin{matrix} {{r = \frac{\Delta_{peak}}{n}},} & (1) \end{matrix}$

wherein Δ_(peak) is the highest peak in the peak-to-peak distance histogram (i.e., Δ_(peak)=maximum(Δ₁, Δ₂, . . . )) and n is the number of pixels between the boundaries 306 e in FIG. 2D.

Further, a computation may be performed with the following three cases assuming the highest peak is at the location Δ_(peak). First, when there is no neighboring peak, then the scale ratio r may be determined according to relation (2) below, as:

$\begin{matrix} {r = {\frac{\Delta_{peak}}{n}.}} & (2) \end{matrix}$

Second, when a second highest peak is in the left-hand side of Δ_(peak), then the scale ratio r may be determined according to relation (3) below, as:

$\begin{matrix} {{t = \frac{f\left( {\Delta_{peak} - 1} \right)}{f\left( \Delta_{peak} \right)}},{\Delta_{peak}^{\prime} = {{t \times \left( {\Delta_{peak} - 1} \right)} + {\left( {1 - t} \right) \times \Delta_{peak}}}},{r = \frac{\Delta_{peak}^{\prime}}{n}},} & (3) \end{matrix}$

where, f(Δ) is the number/value accumulated in the Δ^(th) bin of the given histogram.

The second highest peak is smaller than the highest peak. Based on this second highest peak, a more accurate ratio can be calculated statistically.

Third, when the second highest peak is in the right-hand side of Δ_(peaks) then the scale ratio r may be determined according to relation (4) below, as:

$\begin{matrix} {{t = \frac{f\left( {\Delta_{peak} + 1} \right)}{f\left( \Delta_{peak} \right)}},{\Delta_{peak}^{\prime} = {{t \times \left( {\Delta_{peak} + 1} \right)} + {\left( {1 - t} \right) \times \Delta_{peak}}}},{r = {\frac{\Delta_{peak}^{\prime}}{n}.}}} & (4) \end{matrix}$

The scaling ratio r may be used for image prose processing, such as in the image enhancer 102 that performs blocking artifact reduction using a scaling ratio determined by an image scale ratio detector 104, according to an embodiment of the present invention. Utilizing the scaling ratio may improve the performance of blocking artifact reducers for enhancing the compressed image 304 that is then decompressed and enlarged for display, wherein blocking artifact reduction is applied to the decompressed and enlarged image 302 for reducing blocking artifacts before display on a display screen. A similar process can be used for determining a horizontal scale ratio using horizontal block boundaries in the image 302. Further, the vertical scale ratio and the horizontal scale ratio value can be combined to determine an overall scaling ratio for the decoded (uncompressed) enlarged image 302, relative to the original decoded image 304.

The de-blocking process uses a filter for removing artifacts across the boundary. The strength of filtering is adjusted based on the difference across the boundary. Therefore, placing the filter on the correct position is important. In the enlarged image, the blocking boundary is usually changed, and adjusting the filtering location allows proper functioning of the process.

As is known to those skilled in the art, the aforementioned example architectures described above, according to the present invention, can be implemented in many ways, such as program instructions for execution by a processor, as logic circuits, as an application specific integrated circuit, as firmware, etc. The present invention has been described in considerable detail with reference to certain preferred versions thereof; however, other versions are possible. Therefore, the spirit and scope of the appended claims should not be limited to the description of the preferred versions contained herein. 

1. A method of determining video image scaling in a decoded enlarged image, comprising: receiving a decoded scaled input image comprising a plurality of pixels, wherein the input image has a scaling ratio relative to an original image; detecting blocking boundary artifact pixels in the image; determining a sum of pixel values for each blocking boundary artifact; detecting the pixel distance value between each pair or neighboring block boundaries; and determining said scaling ratio based on a distance value and said sum of pixel values.
 2. The method of claim 1, wherein the scaling ratio comprises an enlargement ratio.
 3. The method of claim 1, wherein the blocking artifacts comprise decompressed blocking artifacts.
 4. The method of claim 1, wherein determining the scaling ratio further includes determining pixel position difference values for each pair of neighboring sum of pixel values.
 5. The method of claim 4, wherein determining the scaling ratio further includes: projecting said sum of pixel values on a histogram relative to image pixel positions of the corresponding blocking boundary artifacts; and determining pixel position difference values for each pair of neighboring sum of pixel values in the histogram.
 6. The method of claim 5, wherein determining said scaling ratio further includes: determining a peak value among the pixel position difference values; and determining said scaling ratio based on said peak value and said pixel position difference value.
 7. The method of claim 6, wherein determining a peak value among the pixel position difference values further includes: projecting the pixel position differences values on a histogram; and determining said peak value among the pixel position difference values from said histogram.
 8. The method of claim 6, wherein determining said scaling ratio includes determining a ratio of the said peak value to said pixel position difference value.
 9. An apparatus for determining video image scaling in a decoded enlarged image, comprising: a blocking artifact detector configured for detecting blocking boundary artifact pixels in a decoded scaled input image comprising a plurality of pixels, wherein the input image has a scaling ratio relative to an original image; a summing module configured for determining a sum of pixel values for each blocking boundary artifact; a distance detector for detecting the pixel distance value between each pair or neighboring block boundaries; and a ratio module configured for determining said scaling ratio based on a distance value and said sum of pixel values.
 10. The apparatus of claim 9, wherein the scaling ratio comprises an enlargement ratio.
 11. The apparatus of claim 9, wherein the blocking artifacts comprise decompressed blocking artifacts.
 12. The apparatus of claim 9 further including a difference function configured for determining pixel position difference values for each pair of neighboring sum of pixel values.
 13. The apparatus of claim 12 further including a first histogram module configured for projecting said sum of pixel values on a histogram relative to image pixel positions of the corresponding blocking boundary artifacts, and the difference function is further configured for determining pixel position difference values for each pair of neighboring sum of pixel values in the histogram.
 14. The apparatus of claim 13, wherein the ratio module is further configured for determining a peak value among the pixel position difference values, and determining said scaling ratio based on said peak value and said pixel position difference value.
 15. The apparatus of claim 14 further including a second histogram module configured for projecting the pixel position differences values on a histogram, and the ratio module is further configured for determining said peak value among the pixel position difference values from said histogram.
 16. The apparatus of claim 14, wherein the ratio module is further configured for determining a ratio of the said peak value to said pixel position difference value, as the scale ratio.
 17. An image post-processing system comprising: a scaling ratio detector including: a blocking artifact detector configured for detecting blocking boundary artifact pixels in a decoded scaled input image comprising a plurality of pixels, wherein the input image has a scaling ratio relative to an original image; a summing module configured for determining a sum of pixel values for each blocking boundary artifact; a distance detector for detecting the pixel distance value between each pair or neighboring block boundaries; and a ratio module configured for determining said scaling ratio based on a distance value and said sum of pixel values; and an image enhancement module configured for enhancing the input image as a function of said scaling ratio.
 18. The system of claim 17, wherein the scaling ratio comprises an enlargement ratio and the blocking artifacts comprise decompressed blocking artifacts.
 19. The system of claim 17 further including a difference function configured for determining pixel position difference values for each pair of neighboring sum of pixel values.
 20. The system of claim 19 further including a first histogram module configured for projecting said sum of pixel values on a histogram relative to image pixel positions of the corresponding blocking boundary artifacts, and the difference function is further configured for determining pixel position difference values for each pair of neighboring sum of pixel values in the histogram.
 21. The system of claim 20, wherein the ratio module is further configured for determining a peak value among the pixel position difference values, and determining said scaling ratio based on said peak value and said pixel position difference value.
 22. The system of claim 21 further including a second histogram module configured for projecting the pixel position differences values on a histogram, and the ratio module is further configured for determining said peak value among the pixel position difference values from said histogram.
 23. The system of claim 21, wherein the ratio module is further configured for determining a ratio of the said peak value to said pixel position difference value, as the scale ratio.
 24. The system of claim 17, wherein the image enhancement module is further configured for enhancing the input image based on the scaling ratio by reducing the blocking artifacts based on the scaling ratio.
 25. The system of claim 24, wherein the image enhancement module is further configured for applying blocking reduction in image areas indicated by the scaling ratio as including blocking artifacts. 